<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>精研 3.0 - FooTable</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <!-- Sweet Alert -->
    <link href="/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <!-- 弹窗-->
    <script src="../../tanchuan/js/jquery-2.0.0.min.js"></script>
    <link href="../../tanchuan/css/displaystyle.css" rel="stylesheet" />
    <script src="../../tanchuan/js/syntaxhighlighter_3.0.83/shCore.js"></script>
    <script src="../../tanchuan/js/syntaxhighlighter_3.0.83/shBrushJScript.js"></script>
    <link href="../../tanchuan/js/syntaxhighlighter_3.0.83/styles/shCoreRDark.css" rel="stylesheet" />
    <script src="../../tanchuan/js/NZ-Plugin/Js/NZ-Window.min.js"></script>
    <link href="../../tanchuan/js/NZ-Plugin/Css/NZ-Window.min.css" rel="stylesheet" />
    <script src="../../tanchuan/js/NZ-Plugin/Js/NZ-Drag.min.js"></script>
    <style>
        /* 隐藏链接元素 */
        .hidden-link {
            position: absolute;
            right: 5px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 16px;
            color: #007bff;
            cursor: pointer;
            opacity: 0;
            transition: opacity 0.3s;
        }

        /* 鼠标悬停显示链接 */
        td:hover .hidden-link {
            opacity: 1;
        }

        /* 可选：美化链接图标 */
        .fa-external-link-square {
            margin-left: 5px;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">

            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h3>自选</h3>
                            <br/>
                            <div class="input-group">
                                <input type="text" id="codeName" placeholder="添加新股票" class="input input-sm form-control">
                                <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-white" onclick="handleClick()">
                                            <i class="fa fa-plus" onclick="handleClick()"></i> 添加</button>
                                </span>
                            </div>
                        </div>
                        <br class="ibox-content">

                            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="100">
                                <thead>
                                <tr>
                                    <th data-toggle="true" >序号</th>
                                    <th data-toggle="true">公司简称</th>
                                    <th style="font-family:arial;font-size:15px;">涨跌</th>
                                    <th style="font-family:arial;font-size:15px;">成交额</th>
                                    <th style="font-family:arial;font-size:15px;">30Min</th>
                                    <th style="font-family:arial;font-size:15px;">30Min(昨)</th>
                                    <th data-hide="all"></th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                    <tr class="gradeX" th:each="tag,resultStat:${companyStocksList}" >
                                        <td th:text="''+${resultStat.count}" style="font-family:arial;font-size:15px;"></td>
<!--                                        <td th:text="''+${tag.code}" style="font-family:arial;font-size:20px;"></td>-->

                                        <!-- 公司代码 -->
<!--                                        <i th:if="${tag.lianXuZhang}" >-->
<!--                                            <td th:text="${tag.name}" style="font-family:arial;font-size:20px;background-color:lightskyblue;color:red;"></td>-->
<!--                                        </i>-->
<!--                                        <i th:if="!${tag.lianXuZhang} " >-->
                                            <td th:text="${tag.name}"  style="font-family:arial;font-size:20px;"></td>
<!--                                        </i>-->


                                        <!-- 涨跌 -->
                                        <i th:if="${tag.mll} ge 0" >
                                            <td th:text="${tag.mll}+'%'" style="font-family:arial;color:red;font-size:20px;"></td>
                                        </i>
                                        <i th:if="${tag.mll} lt 0" >
                                            <td th:text="${tag.mll}+'%'" style="font-family:arial;color:green;font-size:20px;"></td>
                                        </i>

<!--                                        &lt;!&ndash; 昨日涨跌 &ndash;&gt;-->
<!--                                        <i th:if="${tag?.zrZhangDie} ge 0" >-->
<!--                                            <td th:text="${tag.zrZhangDie}+'%'" style="font-family:arial;color:red;font-size:20px;"></td>-->
<!--                                        </i>-->
<!--                                        <i th:if="${tag?.zrZhangDie} lt 0" >-->
<!--                                            <td th:text="${tag.zrZhangDie}+'%'" style="font-family:arial;color:green;font-size:20px;"></td>-->
<!--                                        </i>-->

                                        <!-- 成交额 -->
                                        <i th:if="${tag.mll} ge 0" >
                                            <td th:text="${tag.cje/100000000}+'亿'" style="font-family:arial;color:red;font-size:20px;"></td>
                                        </i>
                                        <i th:if="${tag.mll} lt 0" >
                                            <td th:text="${tag.cje/100000000}+'亿'" style="font-family:arial;color:green;font-size:20px;"></td>
                                        </i>


                                        <!-- 30Min -->
                                        <i th:if="${tag.tradeVol30Min} ge ${tag.yesTodayTradeVol30Min}" >
                                            <td th:text="${tag.tradeVol30Min/10000}+'万'" style="font-family:arial;color:red;font-size:20px;"></td>
                                        </i>
                                        <i th:if="${tag.tradeVol30Min} lt ${tag.yesTodayTradeVol30Min}" >
                                            <td th:text="${tag.tradeVol30Min/10000}+'万'"   style="font-family:arial;color:green;font-size:20px;"></td>
                                        </i>
                                        <!-- yesToday 30Min -->
                                        <td th:text="${tag.yesTodayTradeVol30Min/10000}+'万'" style="font-family:arial;color:lightgrey;font-size:20px;"></td>

                                        <!-- all -->
                                        <td th:if="${not #lists.isEmpty(tag.kanDian)}" >
                                            <div class="row"  th:each="result,resultStat:${tag.kanDian}">
                                                <!-- -->
                                                <a th:text="'【'+${result.tagName}+'】'" style="font-family:arial;color:deeppink;font-size:20px;">  </a>
                                                <div><h6></h6></div>
                                                <a th:text="${result?.ztDesc}" style="font-family:arial;color:red;font-size:15px;">  </a>
                                                <a href="#" th:each="sustainTag, userStat:${result.sustainTags}" >
                                                    <i class="badge badge-warning"  th:text="${sustainTag.name}" style="font-size:16px;color:lightslategray;font-weight:normal;"></i>
                                                    <div><h6></h6> </div>
                                                </a>
                                                <div><h2></h2> </div>
                                            </div>
                                            <div >
                                                <h2>
                                                    <i th:if="${#strings.startsWith(tag.code,'6')} " >
                                                        <img  th:src="@{'http://image.sinajs.cn/newchart/daily/n/sh'+${tag.code}+'.gif'}" >
                                                    </i>
                                                    <i th:if="${#strings.startsWith(tag.code,'0')} " >
                                                        <img  th:src="@{'http://image.sinajs.cn/newchart/daily/n/sz'+${tag.code}+'.gif'}">
                                                    </i>
                                                    <i th:if="${#strings.startsWith(tag.code,'3')} " >
                                                        <img  th:src="@{'http://image.sinajs.cn/newchart/daily/n/sz'+${tag.code}+'.gif'}">
                                                    </i>
                                                </h2>
<!--                                                <i th:text="'<<30Min图>>'+${tag.tradeVol30Min/10000}+'万'" th:id="'name_'+${tag.code}"  onclick="stockMinutes30(this)"  style="font-family:arial;color:red;font-size:20px;"></i>-->
                                        </div>
                                            <!-- -->

                                        </td>
                                        <td>
                                            <a  th:id="'redian_'+${tag.code}"  onclick="stockReDianKan24Hour(this)" > <i class="badge badge-warning">H</i> </a>

                                            <a  th:id="${tag.code}"  onclick="iDongMi(this)" > <i class="badge badge-warning">i懂</i> </a>


                                            <i th:if="${#strings.startsWith(tag.code,'6')} " >
                                                <a  th:id="'sh'+${tag.code}"  onclick="wtchK(this)" > <i class="badge badge-warning">K</i> </a>
                                            </i>
                                            <i th:if="${#strings.startsWith(tag.code,'0')} " >
                                                <a  th:id="'sz'+${tag.code}"  onclick="wtchK(this)" > <i class="badge badge-warning">K</i> </a>
                                            </i>
                                            <i th:if="${#strings.startsWith(tag.code,'3')} " >
                                                <a  th:id="'sz'+${tag.code}"  onclick="wtchK(this)" > <i class="badge badge-warning">K</i> </a>
                                            </i>
                                        </td>
                                    </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <ul class="pagination pull-right"></ul>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
    </div>
<!--    <script src="/js/jquery.min.js?v=2.1.4"></script>-->
<!--    <script src="/js/bootstrap.min.js?v=3.3.5"></script>-->
    <script src="/js/plugins/footable/footable.all.min.js"></script>
<!--    <script src="/js/content.min.js?v=1.0.0"></script>-->

    <!--    <script src="/js/jquery.min.js?v=2.1.4"></script>-->
    <script src="/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/js/plugins/sparkline/jquery.sparkline.min.js"></script>
    <script src="/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="/js/content.min.js?v=1.0.0"></script>
    <script src="/js/demo/peity-demo.min.js"></script>
    <script src="/js/plugins/gritter/jquery.gritter.min.js"></script>
    <script src="/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
        $(document).ready(function(){$(".footable").footable();$(".footable2").footable()});
    </script>
    <script>
        function stockMinutes30(object){
            var code=object.id;
            $.NZ_Window.show({
                url: '/stockMinutes30?code='+code,
                width: 1500,
                height: 1000,
                operate: {
                    btn_Close: true, //关闭按钮
                    btn_Max: true, //最大化按钮
                    btn_Refresh: true, //刷新按钮
                    btn_NewWindow: true, //新窗口按钮
                    resize: true //调整窗口大小按钮
                }
            });
            // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
        }

        function stockReDianKan24Hour(object){
            var code=object.id;
            $.NZ_Window.show({
                url: '/ths/stockKanDian?type=24Hour&code='+code,
                width: 1500,
                height: 1000,
                operate: {
                    btn_Close: true, //关闭按钮
                    btn_Max: true, //最大化按钮
                    btn_Refresh: true, //刷新按钮
                    btn_NewWindow: true, //新窗口按钮
                    resize: true //调整窗口大小按钮
                }
            });
            // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
        }

        function iDongMi(object){
            var code=object.id;
            $.NZ_Window.show({
                url: 'https://t.10jqka.com.cn/m/'+code+'/touzi/',
                width: 1500,
                height: 1000,
                operate: {
                    btn_Close: true, //关闭按钮
                    btn_Max: true, //最大化按钮
                    btn_Refresh: true, //刷新按钮
                    btn_NewWindow: true, //新窗口按钮
                    resize: true //调整窗口大小按钮
                }
            });
            // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
        }

        function wtchK(object){
            var code=object.id;
            $.NZ_Window.show({
                url: "https://quote.eastmoney.com/concept2/"+code+".html#fullScreenChart",
                //url: 'https://t.10jqka.com.cn/m/'+code+'/touzi/',
                width: 1500,
                height: 1000,
                operate: {
                    btn_Close: true, //关闭按钮
                    btn_Max: true, //最大化按钮
                    btn_Refresh: true, //刷新按钮
                    btn_NewWindow: true, //新窗口按钮
                    resize: true //调整窗口大小按钮
                }
            });
            // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
        }
        /**
         * 添加
         * */
        function handleClick() {
            var code = $("#codeName").val();
            if (code == null || code == "" || code.length != 6) {
                if (code.length != 6) {
                    swal({title: "请输入正确的股票代码", text: ""});

                } else {
                    swal({title: "请输入股票代码", text: ""});

                }
            } else {
                if (code.startsWith("6", 0)) {
                    code = "sh" + code;
                } else {
                    code = "sz" + code;
                }
                $.ajax({
                    url: '/ajaxRequest',
                    type: "get",
                    data: {"code": code},
                    success: function (data) {
                        var code1 = $.parseJSON(data);
                        var code = code1.code;
                        var desc = prompt("请输入备注描述：", code1.gpname);
                        $("#addCode").val(code);
                        $("#addDesc").val(desc);
                        handleClickAjax(code, desc);
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        swal({title: "查询失败，请检查股票代码！", text: ""});

                    },
                });
            }
        }

        /**
         * 添加
         * @param code
         * @param desc
         */
        function handleClickAjax(code, desc) {
            $.ajax({
                url: '/addStock',
                type: "get",
                data: {"code": code, "desc": desc},
                success: function (data) {
                    window.location.reload();
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    swal({title: "查询失败，请检查股票代码！", text: ""});
                },
            });
        }
    </script>
</body>

</html>